<?php
class Del extends Controller {
	public function json() {
		$id = $this->post('id', 'int');
				
		if(!$id) $this->displayJSON(array('status' => -1, 'message' => '未知景点'));
		
		$mProduct = new Product_model();
		$params = array('id' => $id);
		$result = $mProduct->del($params);
		if($result) $this->displayJSON(array('status' => 0, 'message' => '删除景点成功'));
		else $this->displayJSON(array('status' => -2, 'message' => '删除景点失败'));
	}
}